package apiday06homework;

public class FinallyDemo {
    public static void main(String[] args) {
        System.out.println("程序开始！");
        try {
            String str = null;
            String str1 = "abc";
            System.out.println(str1.charAt(4));
            System.out.println(str.length());
            return;
        } catch (Exception e) {
            System.out.println("出错了！"+e.getMessage());
        }finally {
            System.out.println("finally代码块");
        }
        System.out.println("程序结束了！");
    }
}
